package com.gtw.modules.dao;

import com.gtw.modules.entity.TbActivityCommodity;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface TbActivityCommodityDao extends BaseDao<TbActivityCommodity> {

    int deleteByPrimaryKey(Integer id);

    int insert(TbActivityCommodity record);

    int insertSelective(TbActivityCommodity record);

    TbActivityCommodity selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TbActivityCommodity record);

    int updateByPrimaryKey(TbActivityCommodity record);

    List<TbActivityCommodity> foundByActivityId(Integer activityid);

    List<TbActivityCommodity> foundBycommodiytId(Integer commodiytid);

    TbActivityCommodity foundByCAndA(Integer commodiytid,Integer activityid);

    TbActivityCommodity foundByActivityidCommodityid(Map<String,Object> map);

    void subStore(@Param("aid") Integer aid,@Param("num") Integer commoditynumber);


    void addStore(@Param("aid") Integer aid,@Param("num") Integer commoditynumber);
}